
import request from '@/utils/request'



//新增订单
export function pay(data) {
    return request({
        url: '/homestay/order',
        method: 'post',
        data
    })
}

//根据用户id查询订单列表
export function orderList(userId) {
    return request({
        url: `/homestay/order/list/${userId}`,
        method: 'get',
    })
}

//查询订单详情
export function orderDetail(orderId) {
    return request({
        url: `/homestay/order/${orderId}`,
        method: 'get',
    })
}

//更新订单
export function update(data) {
    return request({
        url: '/homestay/order',
        method: 'put',
        data
    })
}
